{include file="common::header"/}
<style>
    body{
        background: #ffffff;
    }
    .page_nav{
        line-height: 60px;
        padding: 0 20px 0 20px;
    }
    .page_nav a{
        /*text-decoration: underline;*/
        color: #939393;
    }
    .page_nav a:hover{
        color: #0d0d0d;
        text-decoration: underline;
    }
    .line-limit-length {
        padding-left: 20px;
        width:8em;/*保证文字不会被半汉字截断,显示10个文字*/
        overflow:hidden;/*超出长度的文字隐藏*/
        text-overflow:ellipsis;/*文字隐藏以后添加省略号*/
        white-space:nowrap;/*强制不换行*/
    }
</style>
<link rel="stylesheet" href="__STATIC__/index/css/order.css">
<div class="vip_content">
    <div class="w1200">
        {include file="user::menu"/}
        <div class="r vip_list" >
            <div class="vc_con active">
                <h3>订单记录</h3>
                <div class="page_nav">
                    <form class="layui-form" action="" style="padding: 20px 0 0 20px;">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <input type="text" name="keywords" placeholder="请输入订单号" value="{$Request.get.keywords}" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-inline">
                                <select name="channel" lay-filter="channel">
                                    <option value="">请选择一个渠道</option>
                                    <option {$Request.get.channel == 'wx_scan' ? 'selected' : '' } value="wx_scan">wx_scan</option>
                                    <option {$Request.get.channel == 'qq_scan' ? 'selected' : '' } value="qq_scan">qq_scan</option>
                                    <option {$Request.get.channel == 'ali_web' ? 'selected' : '' } value="ali_web">ali_web</option>
                                </select>
                            </div>
                            <div class="layui-inline">
                                <select name="status" lay-filter="status">
                                    <option value="">请选择一个状态</option>
                                    <option {$Request.get.status == '0' ? 'selected' : '' } value="0">关闭订单</option>
                                    <option {$Request.get.status == '1' ? 'selected' : '' } value="1">等待支付</option>
                                    <option {$Request.get.status == '2' ? 'selected' : '' } value="2">支付成功</option>
                                </select>
                            </div>
                            <button class="layui-btn layui-btn-normal" lay-submit="search">搜索</button>
                        </div>
                    </form>
                </div>
                <table width="auto" style="white-space:nowrap">
                    <thead>
                    <tr>
                        <th>订单号</th>
                        <th>产品</th>
                        <th>金额</th>
                        <th>支付渠道</th>
                        <th class="vc_time">创建时间</th>
                        <th>状态</th>
                    </tr>
                    </thead>
                    <tbody class="vc_tbody">
                    {volist name="list" id="vo"}
                    <tr>
                        <td>{$vo.out_trade_no}</td>
                        <td title="{$vo.body}"> <p class="line-limit-length">{$vo.subject}</p></td>
                        <td class="vc_money">￥{$vo.amount}</td>
                        <td>{$vo.channel}</td>
                        <td class="vc_time">{$vo.create_time|date='Y/m/d h:i:s',###}</td>
                        <td class="ok">
                            {switch $vo.status}
                                {case 0}<span style="color: red;">订单关闭</span>{/case}
                                {case 1}<span style="color: orange;">等待支付</span>{/case}
                                {case 2}<span style="color: green;">支付完成</span>{/case}
                                {default}<span style="color: black;">异常订单</span>{/case}
                            {/switch}
                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
                <div class="page_nav">
                    {$list->render()}
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
</div>
{include file="common::footer"/}

<script>
    layui.use(['form','layer'], function(){
        var form = layui.form(),
            layer = layui.layer;



        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
</body>
</html>